<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./dist/vue.global.js"></script>
</head>
<body>
    <div id="app">
        <div>
            <input v-if="inputType=='email'" type="text" key="0"/>
            <input v-else type="text"  key="0"/>
        </div>
        <button @click="inputType='email'">输入邮件地址</button>
        <button @click="inputType='phone'">输入电话</button>
    </div>
    <script>
        const app=Vue.createApp({
            data(){
                return {
                    inputType:"email"
                }
            }
        })
        app.mount("#app")
    </script>
</body>
</html>